package com.rbs.service.Impl;

import com.rbs.dao.Impl.PhoneDaoImpl;
import com.rbs.dao.PhoneDao;
import com.rbs.entity.Phone;
import com.rbs.service.PhoneService;

import java.util.List;

public class PhoneServiceImpl implements PhoneService {
    private PhoneDao phoneDao = new PhoneDaoImpl();
    @Override
    public List<Phone> selectAllPhone() {
        return phoneDao.selectAllPhone();
    }

    @Override
    public Phone selectPhoneById(int pid) {
        return phoneDao.selectPhoneById(pid);
    }

    @Override
    public int deletePhoneById(int pid) {
        return phoneDao.deletePhoneById(pid);
    }

    @Override
    public int updatePhone(Phone phone) {
        return phoneDao.updatePhone(phone);
    }

    @Override
    public int insertPhone(Phone phone) {
        return phoneDao.insertPhone(phone);
    }

    @Override
    public int deletePhoneByBrandId(int id) {
        return phoneDao.deletePhoneByBrandId(id);
    }

    @Override
    public List<Phone> selectByPage(int start, int PageSize) {
        return phoneDao.selectByPage(start, PageSize);
    }

    @Override
    public int selectCount() {
        return phoneDao.selectCount();
    }
}
